import { cdnBase } from '../config/index';
const imgPrefix = cdnBase;

const defaultDesc = [`${imgPrefix}/goods/details-1.png`];

const allGoods = [
  {
    saasId: '88888888',
    storeId: '1000',
    spuId: '0',
    title: '青花瓷礼品 青花瓷茶杯 青花瓷商务套装 青花瓷工艺品',
    primaryImage: 'https://img.picui.cn/free/2025/06/17/6850b6b073a9a.png',
    images: [
      'https://img.picui.cn/free/2025/06/17/6850b807eef98.png',
      'https://img.picui.cn/free/2025/06/17/6850b8bd69547.png',
    ],
    video: null,
    available: 1,
    minSalePrice: 10000,
    minLinePrice: 10000,
    maxSalePrice: 10000,
    maxLinePrice: 15000,
    spuStockQuantity: 510,
    soldNum: 1020,
    isPutOnSale: 1,
    categoryIds: ['127880527393854975', '127880527393854976', '127880537778953984'],
    specList: [
      {
        specId: '10011',
        title: '种类',
        specValueList: [
          {
            specValueId: '10012',
            specId: null,
            saasId: null,
            specValue: '青花瓷茶杯',
            image: null,
          },
        ],
      },
      {
        specId: '10013',
        title: '尺寸',
        specValueList: [
          {
            specValueId: '11014',
            specId: null,
            saasId: null,
            specValue: '小',
            image: null,
          },
          {
            specValueId: '10014',
            specId: null,
            saasId: null,
            specValue: '中',
            image: null,
          },
          {
            specValueId: '11013',
            specId: null,
            saasId: null,
            specValue: '大',
            image: null,
          },
        ],
      },
    ],
    skuList: [
      {
        skuId: '135676631',
        skuImage: 'https://img.picui.cn/free/2025/06/17/6850b8bd69547.png',
        specInfo: [
          {
            specId: '10011',
            specTitle: null,
            specValueId: '10012',
            specValue: null,
          },
          {
            specId: '10013',
            specTitle: null,
            specValueId: '11014',
            specValue: null,
          },
        ],
        priceInfo: [
          { priceType: 1, price: '10000', priceTypeName: null },
          { priceType: 2, price: '15000', priceTypeName: null },
        ],
        stockInfo: {
          stockQuantity: 175,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: { value: null, unit: 'KG' },
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135676632',
        skuImage: 'https://img.picui.cn/free/2025/06/17/6850b807eef98.png',
        specInfo: [
          {
            specId: '10011',
            specTitle: null,
            specValueId: '10012',
            specValue: null,
          },
          {
            specId: '10013',
            specTitle: null,
            specValueId: '11013',
            specValue: null,
          },
        ],
        priceInfo: [
          { priceType: 1, price: '10000', priceTypeName: null },
          { priceType: 2, price: '15000', priceTypeName: null },
        ],
        stockInfo: {
          stockQuantity: 158,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: { value: null, unit: 'KG' },
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135681631',
        skuImage: 'https://tdesign.gtimg.com/miniprogram/template/retail/goods/nz-09a.png',
        specInfo: [
          {
            specId: '10011',
            specTitle: null,
            specValueId: '10012',
            specValue: null,
          },
          {
            specId: '10013',
            specTitle: null,
            specValueId: '10014',
            specValue: null,
          },
        ],
        priceInfo: [
          { priceType: 1, price: '10000', priceTypeName: null },
          { priceType: 2, price: '15000', priceTypeName: null },
        ],
        stockInfo: {
          stockQuantity: 177,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: { value: null, unit: 'KG' },
        volume: null,
        profitPrice: null,
      },
    ],
    spuTagList: [{ id: '13001', title: '限时抢购', image: null }],
    limitInfo: [
      {
        text: '限购5件',
      },
    ],
    desc: [
      'https://img.picui.cn/free/2025/06/17/6850b807eef98.png',
      'https://img.picui.cn/free/2025/06/17/6850b8bd69547.png',
    ],
    etitle: '',
  },
  {
    saasId: '88888888',
    storeId: '1000',
    spuId: '135686633',
    title: '时尚手镯异域风情复古民族风情手环',
    primaryImage: 'https://img.picui.cn/free/2025/06/17/6850dc70f1893.png',
    minSalePrice: '5000',
    minLinePrice: '7000',
    maxSalePrice: '5000',
    maxLinePrice: '7000',
    isSoldOut: false,
    images: [
      'https://img.picui.cn/free/2025/06/17/6850dc70f1893.png',
      'https://img.picui.cn/free/2025/06/17/6850dc7032ab8.png',
      'https://img.picui.cn/free/2025/06/17/6850dc712c75e.png',
    ],
    groupIdList: ['15029', '14023'],
    spuTagList: [
      {
        id: null,
        title: '2025新款',
        image: null,
      },
    ],
    skuList: [
      {
        skuId: '135686634',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '10001',
            specValue: '金色',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '10003',
            specValue: '54',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '25900',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '31900',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: -9,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135691631',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '10001',
            specValue: '金色',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '11003',
            specValue: '58',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '26900',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '31900',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 177,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135691632',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '10001',
            specValue: '金色',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '11002',
            specValue: '62',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '5000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '7000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 194,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
    ],
    isAvailable: 1,
    spuStockQuantity: 371,
    soldNum: 1032,
    isPutOnSale: 1,
    specList: [
      {
        specId: '10000',
        title: '颜色',
        specValueList: [
          {
            specValueId: '10001',
            specId: '10000',
            saasId: '88888888',
            specValue: '金色',
            image: '',
          },
        ],
      },
      {
        specId: '10002',
        title: '圈口',
        specValueList: [
          {
            specValueId: '11003',
            specId: '10002',
            saasId: '88888888',
            specValue: '54',
            image: '',
          },
          {
            specValueId: '10003',
            specId: '10002',
            saasId: '88888888',
            specValue: '58',
            image: '',
          },
          {
            specValueId: '11002',
            specId: '10002',
            saasId: '88888888',
            specValue: '62',
            image: '',
          },
        ],
      },
    ],
    promotionList: null,
    minProfitPrice: null,
    etitle: '',
    desc: [
      'https://img.picui.cn/free/2025/06/17/6850dc712c75e.png',
      'https://img.picui.cn/free/2025/06/17/6850dc70f1893.png',
    ],
  },
  {
    saasId: '88888888',
    storeId: '1000',
    spuId: '135691628',
    title: '民族围巾一巾二用可做披肩风情民族围巾扎染围巾',
    images: [
      'https://img.picui.cn/free/2025/06/17/6850dfda79217.png',
      'https://img.picui.cn/free/2025/06/17/6850dfda98aa6.png',
      'https://img.picui.cn/free/2025/06/17/6850dfda3cb3c.png',
    ],
    primaryImage: 'https://img.picui.cn/free/2025/06/17/6850dfda79217.png',
    minSalePrice: '4000',
    minLinePrice: '5000',
    maxSalePrice: '4000',
    maxLinePrice: '5000',
    isSoldOut: true,
    groupIdList: ['15029', '14023'],
    spuTagList: [
      {
        id: null,
        title: '2025新款',
        image: null,
      },
    ],
    skuList: [
      {
        skuId: '135686631',
        skuImage: null,
        specInfo: [
          {
            specId: '127904180600844800',
            specTitle: null,
            specValueId: '127904180768617216',
            specValue: '兰色',
          },
          {
            specId: '127904861604820480',
            specTitle: null,
            specValueId: '127904862494014208',
            specValue: '1.0m',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '4000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '5000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 0,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135686632',
        skuImage: null,
        specInfo: [
          {
            specId: '127904180600844800',
            specTitle: null,
            specValueId: '127904180768617216',
            specValue: '兰色',
          },
          {
            specId: '127904861604820480',
            specTitle: null,
            specValueId: '127904862007474176',
            specValue: '1.5m',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '4000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '5000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 0,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135691629',
        skuImage: null,
        specInfo: [
          {
            specId: '127904180600844800',
            specTitle: null,
            specValueId: '127904180768617216',
            specValue: '兰色',
          },
          {
            specId: '127904861604820480',
            specTitle: null,
            specValueId: '127904862175246592',
            specValue: '2.0m',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '4000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '5000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 0,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135691630',
        skuImage: null,
        specInfo: [
          {
            specId: '127904180600844800',
            specTitle: null,
            specValueId: '127904180768617216',
            specValue: '兰色',
          },
          {
            specId: '127904861604820480',
            specTitle: null,
            specValueId: '127904861755815680',
            specValue: '2.5m',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '4000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '5000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 0,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
    ],
    isAvailable: 1,
    spuStockQuantity: 0,
    soldNum: 1022,
    isPutOnSale: 1,
    specList: [
      {
        specId: '127904180600844800',
        title: '颜色',
        specValueList: [
          {
            specValueId: '127904180768617216',
            specId: '127904180600844800',
            saasId: '88888888',
            specValue: '兰色',
            image: '',
          },
        ],
      },
      {
        specId: '127904861604820480',
        title: '长度',
        specValueList: [
          {
            specValueId: '127904862494014208',
            specId: '127904861604820480',
            saasId: '88888888',
            specValue: '1.0m',
            image: '',
          },
          {
            specValueId: '127904862175246592',
            specId: '127904861604820480',
            saasId: '88888888',
            specValue: '1.5m',
            image: '',
          },
          {
            specValueId: '127904862007474176',
            specId: '127904861604820480',
            saasId: '88888888',
            specValue: '2.0m',
            image: '',
          },
          {
            specValueId: '127904861755815680',
            specId: '127904861604820480',
            saasId: '88888888',
            specValue: '2.5m',
            image: '',
          },
        ],
      },
    ],
    promotionList: null,
    minProfitPrice: null,
    etitle: '',
    desc: [
      'https://img.picui.cn/free/2025/06/17/6850dfda98aa6.png',
      'https://img.picui.cn/free/2025/06/17/6850dfda3cb3c.png',
    ],
  },
  {
    saasId: '88888888',
    storeId: '1000',
    spuId: '135686623',
    title: '藏式五彩手绳女手工编织手链饰品男女红绳手串手搓棉麻手饰手编绳',
    primaryImage: 'https://img.picui.cn/free/2025/06/17/6850f86136c3e.png',
    images: [
      'https://img.picui.cn/free/2025/06/17/6850f86123573.png',
      'https://img.picui.cn/free/2025/06/17/6850f8b45bdcf.png',
    ],
    minSalePrice: '2000',
    minLinePrice: '3000',
    maxSalePrice: '2000',
    maxLinePrice: '3000',
    isSoldOut: false,
    groupIdList: [
      '15029',
      '15030',
      '14023',
      '127886731843219200',
      '127886732665303040',
      '127886733101511680',
      '127886733923595520',
      '14025',
      '127886726071855616',
      '14026',
      '127886727481142784',
      '127886731440566784',
    ],
    spuTagList: [
      {
        id: null,
        title: '限时抢购',
        image: null,
      },
    ],
    skuList: [
      {
        skuId: '135686624',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '10001',
            specValue: '男款',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '10003',
            specValue: '14-17cm',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 98,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135686625',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '11000',
            specValue: '女款',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '11003',
            specValue: '17-22cm',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 100,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135686626',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '11000',
            specValue: '男款',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '11002',
            specValue: '22-27cm',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 100,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135691622',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '10001',
            specValue: '男款',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '11003',
            specValue: 'S',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 100,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135691623',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '10001',
            specValue: '男款',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '11002',
            specValue: '22-27cm',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 100,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135691624',
        skuImage: null,
        specInfo: [
          {
            specId: '10000',
            specTitle: null,
            specValueId: '11000',
            specValue: '女款',
          },
          {
            specId: '10002',
            specTitle: null,
            specValueId: '10003',
            specValue: '17-22cm',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 100,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
    ],
    isAvailable: 1,
    spuStockQuantity: 598,
    soldNum: 102,
    isPutOnSale: 1,
    desc: [
      'https://img.picui.cn/free/2025/06/17/6850f86136c3e.png',
      'https://img.picui.cn/free/2025/06/17/6850f8b45bdcf.png',
    ],
    specList: [
      {
        specId: '10000',
        title: '款式',
        specValueList: [
          {
            specValueId: '10001',
            specId: '10000',
            saasId: '88888888',
            specValue: '男款',
            image: '',
          },
          {
            specValueId: '11000',
            specId: '10000',
            saasId: '88888888',
            specValue: '女款',
            image: '',
          },
        ],
      },
      {
        specId: '10002',
        title: '尺码',
        specValueList: [
          {
            specValueId: '11003',
            specId: '10002',
            saasId: '88888888',
            specValue: '14-17cm',
            image: '',
          },
          {
            specValueId: '10003',
            specId: '10002',
            saasId: '88888888',
            specValue: '17-22cm',
            image: '',
          },
          {
            specValueId: '11002',
            specId: '10002',
            saasId: '88888888',
            specValue: '22-27cm',
            image: '',
          },
        ],
      },
    ],
    promotionList: null,
    minProfitPrice: null,
    etitle: '',
  },
  {
    saasId: '88888888',
    storeId: '1000',
    spuId: '135681628',
    title: '钥匙链蒙古包匙扣内蒙古工艺礼品手工艺品草原旅游纪念品',
    primaryImage: 'https://img.picui.cn/free/2025/06/17/6850fbbad9bcb.png',
    images: [
      'https://img.picui.cn/free/2025/06/17/6850fbbad9bcb.png',
      'https://img.picui.cn/free/2025/06/17/6850fbbaeb104.png',
      'https://img.picui.cn/free/2025/06/17/6850fbba69459.png',
    ],
    minSalePrice: '2000',
    minLinePrice: '3000',
    maxSalePrice: '3000',
    maxLinePrice: '3000',
    isSoldOut: false,
    groupIdList: [
      '14023',
      '127886732245873408',
      '127886733487386880',
      '14025',
      '127886726071855616',
      '14026',
      '127886728420666112',
      '127886728957538048',
      '127886729779621888',
      '127886730165497088',
      '127886730652037376',
      '127886731037912576',
      '127886731440566784',
      '127886729360190464',
      '15029',
      '15030',
    ],
    spuTagList: [
      {
        id: null,
        title: '限时抢购',
        image: null,
      },
    ],
    skuList: [
      {
        skuId: '135676629',
        skuImage: null,
        specInfo: [
          {
            specId: '127904180600844800',
            specTitle: null,
            specValueId: '127904181322265856',
            specValue: '正常尺寸',
          },
          {
            specId: '127904861604820480',
            specTitle: null,
            specValueId: '127904862175246592',
            specValue: '草帽',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 80,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135676630',
        skuImage: null,
        specInfo: [
          {
            specId: '127904180600844800',
            specTitle: null,
            specValueId: '127904181322265856',
            specValue: '正常尺寸',
          },
          {
            specId: '127904861604820480',
            specTitle: null,
            specValueId: '127904861755815680',
            specValue: '尖尖帽',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 122,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135681629',
        skuImage: null,
        specInfo: [
          {
            specId: '127904180600844800',
            specTitle: null,
            specValueId: '127904181322265856',
            specValue: '正常尺寸',
          },
          {
            specId: '127904861604820480',
            specTitle: null,
            specValueId: '127904862007474176',
            specValue: '尖尖帽',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 119,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
    ],
    desc: [
      'https://img.picui.cn/free/2025/06/17/6850fbbaeb104.png',
      'https://img.picui.cn/free/2025/06/17/6850fbba69459.png',
    ],
    isAvailable: 1,
    spuStockQuantity: 321,
    soldNum: 102,
    isPutOnSale: 1,
    specList: [
      {
        specId: '127904180600844800',
        title: '尺寸',
        specValueList: [
          {
            specValueId: '127904181322265856',
            specId: '127904180600844800',
            saasId: '88888888',
            specValue: '正常尺寸',
            image: '',
          },
        ],
      },
      {
        specId: '127904861604820480',
        title: '样式',
        specValueList: [
          {
            specValueId: '127904862175246592',
            specId: '127904861604820480',
            saasId: '88888888',
            specValue: '草帽',
            image: '',
          },
          {
            specValueId: '127904862007474176',
            specId: '127904861604820480',
            saasId: '88888888',
            specValue: '尖尖帽',
            image: '',
          },
          {
            specValueId: '127904861755815680',
            specId: '127904861604820480',
            saasId: '88888888',
            specValue: '酒壶',
            image: '',
          },
        ],
      },
    ],
    promotionList: null,
    minProfitPrice: null,
    etitle: '',
  },
  {
    saasId: '88888888',
    storeId: '1000',
    spuId: '135681626',
    title: '云南丽江民族风创意藏式流苏挂件吊饰景区礼品',
    primaryImage: 'https://img.picui.cn/free/2025/06/17/6850fe9024744.png',
    images: [
      'https://img.picui.cn/free/2025/06/17/6850fe9006ef5.png',
      'https://img.picui.cn/free/2025/06/17/6850fe8f6258c.png',
      'https://img.picui.cn/free/2025/06/17/6850fe8f5d759.png',
    ],
    minSalePrice: '2000',
    minLinePrice: '3000',
    maxSalePrice: '2000',
    maxLinePrice: '3000',
    isSoldOut: false,
    groupIdList: [
      '15029',
      '15030',
      '14023',
      '127886732245873408',
      '127886733487386880',
      '14025',
      '127886726071855616',
      '14026',
      '127886728420666112',
      '127886728957538048',
      '127886730652037376',
      '127886731037912576',
    ],
    spuTagList: [
      {
        id: null,
        title: '限时抢购',
        image: null,
      },
    ],
    skuList: [
      {
        skuId: '135676627',
        skuImage: null,
        specInfo: [
          {
            specId: '10006',
            specTitle: null,
            specValueId: '10007',
            specValue: '正常尺寸',
          },
          {
            specId: '11007',
            specTitle: null,
            specValueId: '10009',
            specValue: '金色',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 123,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135676628',
        skuImage: null,
        specInfo: [
          {
            specId: '10006',
            specTitle: null,
            specValueId: '10007',
            specValue: '正常尺寸',
          },
          {
            specId: '11007',
            specTitle: null,
            specValueId: '10008',
            specValue: '金+银色',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 123,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
      {
        skuId: '135681627',
        skuImage: null,
        specInfo: [
          {
            specId: '10006',
            specTitle: null,
            specValueId: '10007',
            specValue: '正常尺寸',
          },
          {
            specId: '11007',
            specTitle: null,
            specValueId: '11008',
            specValue: '银色',
          },
        ],
        priceInfo: [
          {
            priceType: 1,
            price: '2000',
            priceTypeName: '销售价格',
          },
          {
            priceType: 2,
            price: '3000',
            priceTypeName: '划线价格',
          },
        ],
        stockInfo: {
          stockQuantity: 120,
          safeStockQuantity: 0,
          soldQuantity: 0,
        },
        weight: null,
        volume: null,
        profitPrice: null,
      },
    ],
    desc: [
      'https://img.picui.cn/free/2025/06/17/6850fe9006ef5.png',
      'https://img.picui.cn/free/2025/06/17/6850fe8f6258c.png',
      'https://img.picui.cn/free/2025/06/17/6850fe8f5d759.png',
    ],
    isAvailable: 1,
    spuStockQuantity: 366,
    soldNum: 102,
    isPutOnSale: 1,
    specList: [
      {
        specId: '10006',
        title: '尺寸',
        specValueList: [
          {
            specValueId: '10007',
            specId: '10006',
            saasId: '88888888',
            specValue: '正常尺寸',
            image: '',
          },
        ],
      },
      {
        specId: '11007',
        title: '颜色',
        specValueList: [
          {
            specValueId: '10009',
            specId: '11007',
            saasId: '88888888',
            specValue: '金色',
            image: '',
          },
          {
            specValueId: '11008',
            specId: '11007',
            saasId: '88888888',
            specValue: '银色',
            image: '',
          },
          {
            specValueId: '10008',
            specId: '11007',
            saasId: '88888888',
            specValue: '金+银色',
            image: '',
          },
        ],
      },
    ],
    promotionList: null,
    minProfitPrice: null,
    etitle: '',
  },
];

/**
 * @param {string} id
 * @param {number} [available] 库存, 默认1
 */
export function genGood(id, available = 1) {
  const specID = ['135681624', '135681628'];
  if (specID.indexOf(id) > -1) {
    return allGoods.filter((good) => good.spuId === id)[0];
  }
  const item = allGoods[id % allGoods.length];
  return {
    ...item,
    spuId: `${id}`,
    available: available,
    desc: item?.desc || defaultDesc,
    images: item?.images || [item?.primaryImage],
  };
}
